<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/6/14 0014
 * Time: 下午 3:50
 */
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\file\FileInput;
use kartik\select2\Select2;
use yii\web\JsExpression;
use app\common\Functions;
use kartik\date\DatePicker;

/* @var $this yii\web\View */
/* @var $model \yii2mod\rbac\models\BizRuleModel */
/* @var $form ActiveForm */
?>

<?php

$fieldOptions  = [];
$labelOptions  = [];
$fieldOptions['class']  = 'col-md-6';
$options['options']=$fieldOptions;
$selectOptions = [];
$selectOptions['style'] = 'width:100%';
$selectOptions['class'] = ' select2 select2-hidden-accessible';

//默认的字段类型
$defineFieldStyle = [
    'template'      => "{label}\n<div class=\"col-sm-8\">{input}</div>\n{error}",
    'labelOptions' => ['class' => 'col-sm-4 control-label']];

?>

<section class="content document-cancel-order-form">

        <div class="box-body box-profile">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span></button>

                <h4 class="modal-title"><?php echo Html::encode($this->title);?></h4>
            </div>
            <div class="row">

                <div class="box-body">

                    <?php $form = ActiveForm::begin(); ?>

                    <?= $form->field($model, 'input_time',$defineFieldStyle)->label( '修改录入日期')->widget(DatePicker::classname(), [
                        'options' => ['placeholder' => ''],
                        'pluginOptions' => [
                            'autoclose' => true,
                            'todayHighlight' => true,
                            'format' => 'yyyy-mm-dd',
                        ]
                    ]);?>

                    <hr/>

                    <?php echo  $form->field($model, 'remark')->label( '请务必填写跟进记录！')->textarea(['maxlength' => 256,'rows'=>3]);
                    ?>


                    <div class="modal-footer">

                        <?php echo Html::a(Yii::t('region', 'Cancel'), '', ['class' => 'btn btn-default','data-dismiss'=>'modal']); ?>
                        <?php echo Html::submitButton($model->getIsNewRecord() ? Yii::t('region', 'Create') : Yii::t('region', 'Update'), [
                            'class' => $model->getIsNewRecord() ? 'btn btn-success' : 'btn btn-primary', ]); ?>
                    </div>


                    <?php ActiveForm::end(); ?>

                </div>
            </div>
        </div>

</section>
